/**
 * @Author: Boring
 * @Description:
 * @File:  pv
 * @Date: 2024-03-02 14:50
 */

package pv

import (
	"github.com/gin-gonic/gin"
	"oam-manage-backend/controllers/pv"
)

func create(pvGroup *gin.RouterGroup) {
	pvGroup.POST("/create", pv.Create)
}

func update(pvGroup *gin.RouterGroup) {
	pvGroup.PUT("/update", pv.Update)
}

func delete(pvGroup *gin.RouterGroup) {
	pvGroup.DELETE("/delete", pv.Delete)
}

func deleteList(pvGroup *gin.RouterGroup) {
	pvGroup.POST("/deleteList", pv.DeleteList)
}

func get(pvGroup *gin.RouterGroup) {
	pvGroup.GET("/get", pv.Get)
}

func list(pvGroup *gin.RouterGroup) {
	pvGroup.GET("/list", pv.List)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	pvGroup := g.Group("/pv")
	create(pvGroup)
	update(pvGroup)
	delete(pvGroup)
	deleteList(pvGroup)
	get(pvGroup)
	list(pvGroup)
}
